<?php

namespace App\Http\Middleware;

use Closure;

/**
 * 后台管理员权限页面检查
 */
class AdminAuth
{
    public function handle($request, Closure $next)
    {
        if (!ss('admin_id')) {
            return response()->json(['code' => 2, 'msg' => '登录已过期！']);
        }
        return $next($request);
    }
}
